package com.cbitedu.springboot.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration//保证该类会被扫描到
@PropertySource("classpath:config/customconfig.properties")  //定义了要读取的properties文件的位置
public class CustomValue {
    @Override
    public String toString() {
        return "CustomValue{" +
                "picPath='" + picPath + '\'' +
                ", videoPath='" + videoPath + '\'' +
                ", serverDomain='" + serverDomain + '\'' +
                '}';
    }

    public String getPicPath() {
        return picPath;
    }

    public void setPicPath(String picPath) {
        this.picPath = picPath;
    }

    @Value("${config.picpath}")
    private String picPath;
    @Value("${config.videopath}")
    private String videoPath;
    @Value("${config.serverdomain}")
    private String serverDomain;

}
